// import { getAllRoleList } from '/@/api/demo/system';
import { BasicColumn, FormSchema } from '/@/components/Table';

const myMap = new Map<number, any>([
  [1, '在售'],
  [0, '停用'],
]);
export const columns: BasicColumn[] = [
  {
    title: '菜品图片',
    dataIndex: 'firstImgUrl',
    slots: { customRender: 'firstImgUrl' },
    width: 120,
  },
  {
    title: '菜品名称',
    dataIndex: 'name',
    width: 120,
  },
  {
    title: '菜品分类',
    dataIndex: 'cuisineTypeName',
    width: 120,
  },
  {
    title: '单位',
    dataIndex: 'unitName',
    width: 120,
  },
  {
    title: '价格',
    dataIndex: 'money',
    width: 120,
  },
  {
    title: '状态',
    dataIndex: 'state',
    width: 200,
    format: myMap,
  },
  {
    title: '备注',
    dataIndex: 'remark',
    width: 200,
  },
];

export const searchFormSchema: FormSchema[] = [
  {
    field: 'name',
    label: '名称',
    component: 'Input',
    colProps: { span: 8 },
  },
];
